<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>翻转盒子</title>
  <style>
    body{display: flex;justify-content: center;
      align-items: center;min-height: 100vh;perspective: 500px;}
    .wrapper{width: 200px;text-align: center;line-height: 200px; transition: all .5s;transform-style: preserve-3d;
    height: 200px;border-radius: 50%; position: relative;}
    .positive,
    .negative{position: absolute; width: inherit;height: inherit;border-radius: 50%;}
    .positive{ background: url(img/front.jpg) no-repeat;z-index: 99;  transform: translateZ(1px);}
    .negative{background: url(img/back.jpg) no-repeat;transform: rotate3d(0,1,0,180deg);}
    .wrapper:hover{transform: rotate3d(0,1,0,180deg);}
  </style>
</head>
<body>
  <div class="wrapper">
    <div class="positive"></div>
    <div class="negative"></div>
  </div>
</body>
</html>